HOW TO USE REPLICATION_CODE_FINAL:

The authors used the following software to create all figures and tables:
- STATA version 16.0
- MiKTeX 2.9.6960 64-bit
- Haver DLXVG3 version 5.1.3.9
- Word version 2008
- Windows 10

REPLICATION_CODE_FINAL contains 4 subfolders:
- Data
- Do
- Figures
- Tables

For users with MiKTeX installed:
To quickly replicate all tables and figures, users can open Do/create_all_tables_and_figures.do, set the working
directory and Haver directory at the top of the file, and run it in STATA. This will output .png files 
for all of the figures, fragment .tex files for most of the tables, and the compiled .pdfs for Tables 1-5 and Tables A3-A20. See "For all users" 
section for how we formatted the finished Figures 1-2 and A1-A6 in Microsoft Word.

For users with a different LaTeX compiler:
To quickly replicate all tables and figures, users can open Do/create_all_tables_and_figures.do, set the working
directory and Haver directory at the top of the file, and run it in STATA. This will output .png files 
for all of the figures and fragment .tex files for most of the tables. In order to produce the .pdfs for Tables 1-5 and Tables A3-A20, compile the
following .tex files in the folder "Tables":
- main_tables.tex: When compiled, this file produces main_tables.pdf with Tables 1-5
- appendix_extensive_margin_tables.tex: When compiled, this file produces appendix_extensive_margin_tables.pdf
with Tables A3 and A4
- appendix_robust_tables.tex: When compiled, this file produces appendix_robust_tables.pdf with Tables A11-A20
- appendix_full_specification_tables.tex: When compiled, this file produces appendix_full_specification_tables.pdf
with Tables A11-A20

For all users:
The finished Figures 1-2 and A1-A6 were produced by copying and pasting the relevant .png files into Word and adding
titles and captions. The list of relevant .png files is given in the Table of Contents below.
Tables A1 and A2 include text content only and were created in Microsoft Word by the authors.

Table of Contents:

Do [all files in the folder should be run in STATA]:
- create_all_tables_and_figures.do: Master .do file to create all figures and tables in the publication and appendix.
This file references the following individual .do files, which can also be used to replicate a particular table or 
figure. 
- durables_merge_replicate: .do file that merges durables spending data with expectations data to create data file matched_data_durables_Jun2018_baseline.dta used in regressions and other outputs 
- nondurables_merge_replicate: .do file that merges nondurables spending data with expectations data to create data file matched_data_nondurables_jun2018_baseline.dta used in regressions and other outputs
- sample_overlap.do: .do file that identifies respondents in both the durables and nondurables spending data and creates overlap_sample_ids.dta
- create_figure_1a: .do file to produce figure_1a.png and 1a.gph 
- create_figure_1b: .do file to produce figure_1b.png and 1b.gph. To create a .png file of
Figure 1 as it appears in the publication, first run create_figure_1a and then run create_figure_1b.
- create_figure_2: .do file to produce figure_2.png
- create_figure_A1: .do file to produce figure_A1.png
- create_figure_A2: .do file to produce figure_A2.png
- create_figure_A3_A4: .do file to produce figure_A3.png and figure_A4.png
- create_figure_A5: .do file to produce figure_A5.png
- create_figure_A6: .do file to produce figure_A6.png
- create_table1a_sumstats: .do file to produce sumstats_wt2.tex
- create_table1b_sumstats_mort: .do file to produce sumstats_mort.tex
- create_table2_durables_real2var_tabs: .do file to produce durables_real2var_tabs.tex and 
durables_real2var_tabs_full.tex
- create_table3_margins_tables_durables: .do file to produce margins_tables_durables.tex
- create_table4_reg_tabs_nondurables: .do file to produce reg_tabs_nondurables.tex and
reg_tabs_nondurables_full.tex
- create_table5_margins_tables_nondurables: .do file to produce margins_tables_nondurables.tex
- create_tableA3_boughtdur2_tabs: .do file to produce boughtdur2_tabs.tex and boughtdur2_tabs_full.tex
- create_tableA4_boughtdur2_morttabs: .do file to produce boughtdur2_morttabs.tex and
boughtdur2_morttabs_full.tex
- create_tableA5_durables_real2var_tabs_robust: .do file to produce durables_real2var_tabs_robust.tex and
durables_real2var_tabs_robust_full.tex
- create_tableA6_durables_real2var_morttabs_robust: .do file to produce durables_real2var_morttabs_robust.tex
and durables_real2var_morttabs_robust_full.tex
- create_tableA7_boughtdur2_tabs_robust: .do file to produce boughtdur2_tabs_robust.tex and
boughtdur2_tabs_robust_full.tex
- create_tableA8_boughtdur2_morttabs_robust: .do file to produce boughtdur2_morttabs_robust.tex and 
boughtdur2_morttabs_robust_full.tex
- create_tableA9_reg_tabs_nondurables_robust: .do file to produce reg_tabs_nondurables_robust.tex and
reg_tabs_nondurables_robust_full.tex
- create_tableA10_reg_morttabs_nondurables_robust: .do file to produce reg_morttabs_nondurables_robust.tex
and reg_morttabs_nondurables_robust_full.tex

Figures:
- 1a.gph: file used by STATA to create figure_1.png
- 1b.gph: file used by STATA to create figure_1.png
- figure_1a.png: first panel of Figure 1
- figure_1b.png: second panel of Figure 1
- figure_1.png: Figure 1
- figure_2.png: Figure 2
- figure_A1.png: Figure A1
- figure_A2.png: Figure A2
- figure_A3.png: Figure A3
- figure_A4.png: Figure A4
- figure_A5.png: Figure A5
- figure_A6.png: Figure A6
- appendix_figures: Word document created by the authors to aggregate, title, and caption Figures A1-A6.
- main_figures: Word document created by the authors to aggregate, title, and caption Figures 1 and 2.

Tables:
There are four master .tex files which, when compiled, produce all tables in the publication and appendix (except Tables A1 and A2).
See instructions above for compiling.
- main_tables.tex: Tables 1-5 in the publication
- appendix_extensive_margin_tables.tex: Tables A3-A4 in the appendix
- appendix_robust_tables.tex: Tables A5-A10 in the appendix
- appendix_full_specification_tables.tex: Tables A11-A20 in the appendix
All other .tex files are tables created by the codes in the folder "Do" and are called by the master .tex files. 
- sumstats_wt2: Table 1a in the publication
- sumstats_mort: Table 1b in the publication
- durables_real2var_tabs: Table 2 in the publication
- margins_tables_durables: Table 3 in the publication
- reg_tabs_nondurables: Table 4 in the publication
- margins_tables_nondurables: Table 5 in the publication
- boughtdur2_tabs: Table A3 in the appendix
- boughtdur2_morttabs: Table A4 in the appendix
- durables_real2var_tabs_robust: Table A5 in the appendix
- durables_real2var_morttabs_robust: Table A6 in the appendix
- boughtdur2_tabs_robust: Table A7 in the appendix
- boughtdur2_morttabs_robust: Table A8 in the appendix
- reg_tabs_nondurables_robust: Table A9 in the appendix
- reg_morttabs_nondurables_robust: Table A10 in the appendix
- durables_real2var_tabs_full: Table A11 in the appendix
- reg_tabs_nondurables_full: Table A12 in the appendix
- boughtdur2_tabs_full: Table A13 in the appendix
- boughtdur2_morttabs_full: Table A14 in the appendix
- durables_real2var_tabs_robust_full: Table A15 in the appendix
- durables_real2var_morttabs_robust_full: Table A16 in the appendix
- boughtdur2_tabs_robust_full: Table A17 in the appendix
- boughtdur2_morttabs_robust_full: Table A18 in the appendix
- reg_tabs_nondurables_robust_full: Table A19 in the appendix
- reg_morttabs_nondurables_robust_full: Table A20 in the appendix
Files with an extension other than .tex are auxiliary files created by MiKTeX when the master .tex files 
are compiled.

Data:
- haver_m: monthly CPI values used to deflate nondurables spending data pulled from Haver (2013)
- matched_data_durables_Jun2018_baseline: dataset of merged durables spending and expectations used in regression analysis
- matched_data_nondurables_jun2018_baseline: dataset of merged nondurables spending and expectations used in regression analysis
- mweights_pooled: household panel weights for nondurables sample data supplied by staff at RAND
- overlap_sample_ids: list of respondent ids which are found in both the durables and nondurables spending panels
- padd1a-padd5: Retail gas price data for each of eight petroleum administration regions in the U.S. sourced from the 
Energy Information Administration
- qweights_pooled: household panel weights for durables sample data supplied by staff at RAND
- cons_panel2: spending survey data, including spending on nondurables goods/services as well as durable goods (RAND-ALP)
- complete_panel_alldates: expectations survey data from NY Fed mini-module on expectations (addendum to RAND-ALP)
- app_cpi: appliances CPI data from Haver (2013)
- durables_cpi: durable goods CPI data from Haver (2013)
- wagedensity_data_long: household wage expectations fitted density data
- infl_density_data_long: household inflation expectations fitted density data (one-year ahead expectations)
- longinfl_density_data_long: household inflation expectations fitted density data (two-to-three-year ahead expectations) 








